import { KlMcClientProxy } from "./KlMcClientProxy";

(async () => {
  const klMcClientProxy = new KlMcClientProxy();
  await klMcClientProxy.initClient("127.0.0.1", 6000);

  const str = "klMcClientProxy";
  await klMcClientProxy.writeString("D0", str);
  const res1 = await klMcClientProxy.readString("D0", str.length);
  console.log("res1==============", res1);

  const arr = [111, 222, 333, 444, 555, 666, 777];
  await klMcClientProxy.writeArr("D0", arr);
  const res2 = await klMcClientProxy.readArr("D0", 7);
  console.log("res2==============", res2);

  await klMcClientProxy.writeNum("D0", 888);
  const res3 = await klMcClientProxy.readNum("D0");
  console.log("res3==============", res3);

  klMcClientProxy.close();
})();
